package com.zb.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author WEN
 * @Date 2023/7/24 0024
 **/
@Data
@ApiModel("商家组织列表实体")
public class OrganizesVo {
    @ApiModelProperty(value = "组织ID")
    private Long id;

    @ApiModelProperty(value = "父级ID，值=0为独立子公司，-1表示属于商家下的非独立组织")
    private Long parentId;

    @ApiModelProperty(value = "名称")
    private String name;

    @ApiModelProperty(value = "是否系统企业名称：false-不是，true-是，为true时则不可以修改")
    private boolean system;

    @ApiModelProperty(value = "下级组织")
    private List<OrganizesVo> organizesVos = new ArrayList<>();

    public OrganizesVo(){}

    public OrganizesVo(Long id, Long parentId, String name, boolean system) {
        this.id = id;
        this.parentId = parentId;
        this.name = name;
        this.system = system;
    }

    public OrganizesVo organizesVos(List<OrganizesVo> organizesVos) {
        this.organizesVos = organizesVos;
        return this;
    }

}
